package cn.zl.web.dto.streampush;

import cn.yunbamboos.rest.service.anno.param.ParamType;
import cn.yunbamboos.rest.service.anno.param.enums.Type;
import cn.yunbamboos.rest.service.dto.in.GenericInDTO;
import com.alibaba.fastjson2.JSONObject;
import jakarta.validation.constraints.NotNull;

public class PlayStreamPushInDTO extends GenericInDTO {

    @NotNull(message = "推流ID不能为空")
    @ParamType(path = "push_id", type = Type.Long, title = "推流ID", required = true, example = "1")
    private String pushId;

    @Override
    public void decode(JSONObject json) {
        super.decode(json);
        this.pushId = json.getString("push_id");
    }

    public String getPushId() {
        return pushId;
    }
}
